import channel from '../utils/request'

export const getAllChannels = () => {
  return channel({
    method: 'get',
    url: '/app/v1_0/channels'
  })
}

export const addChannel = channel => {
  return channel({
    method: 'PATCH',
    url: '/app/v1_0/user/channels',
    data: {
      channels: [channel]
    }
  })
}

export const deleteChannel = channelId => {
  return channel({
    method: 'DELETE',
    url: `/app/v1_0/user/channels/${channelId}`
  })
}